'''
* This is the projet for Brtc LlmOps Platform
* @Author Leon-liao <liaosiliang@alltman.com>
* @Description //TODO 
* @File: study_home_work_sort.py
* @Time: 2025/6/29
* @All Rights Reserve By Brtc
'''
# version = 1.0

# 只有两个元素
"""
def sort_num(list_val:list):
    if list_val[0] < list_val[1]:
        tmp = list_val[0]
        list_val[0] = list_val[1]
        list_val[1] = tmp
        
test_list = [3,4]
print(test_list)
sort_num(test_list)
print(test_list)
"""
# 如果 有 1000个元素怎么办？
# 思路[3, 4, 7, 8]
# 从第一个开始[4,3,7,8],[4,7,3,8], [4,7,8,3]
#[4,7,8,3]
# 从第一个开始[7,4,8,3],[7,8,4,3]....
# VERSION == 2.0
"""
def sort_num2(list_val:list):
    num_len = len(list_val)
    for i in range(0,num_len, 1):
        for j in range(0,num_len, 1):
            if list_val[i] > list_val[j]:
                tmp = list_val[j]
                list_val[j] = list_val[i]
                list_val[i] = tmp

test_list = [3, 4, 7, 8,1000, 90, 89, 77]
print(test_list)
sort_num2(test_list)
print(test_list)
"""
# 交换两个数字
"""
a = 1
b = 2

c = b
b = a
a = c
"""
# 有两杯水， A B A<--C-->B  C
